<script setup>
import { getCurrentInstance, onMounted, ref } from 'vue';
const that = getCurrentInstance().proxy

let num = ref(10)

const printNum = () => {
  console.log('num', num.value);
}

const openMessageBox = e => {
  console.log('点击了按钮');
  that.$T_alert({
    title: '标题',
    message: 'hello world',
  }).then(data => {
    console.log('点了确认', data);
    printNum()
  }).catch(data => {
    console.log('点了取消', data);
  })
}
</script>

<template>
  <section>
    <el-button @click="openMessageBox">
      click to open message box
    </el-button>
  </section>
</template>
<style>
@media (min-width: 1024px) {
  .about {
    min-height: 100vh;
    display: flex;
    align-items: center;
  }
}
</style>
